package model;

import dao.Album;
import service.AlbumService;
import service.AlbumServiceImpl;

import java.util.List;

public class AlbumModel {

    private static final AlbumModel INSTANCE = new AlbumModel();
    private static final AlbumService albumService = AlbumServiceImpl.getInstance();

    private AlbumModel() {

    }

    public static AlbumModel getInstance() {
        return INSTANCE;
    }

    public Album getAlbumByAlbumId(String albumId) {
        return albumService.getAlbumByAlbumId(Long.valueOf(albumId));
    }

    public List<Album> getAlbumsByArtistId(String artistId) {
        return albumService.getAlbumsByArtistId(Long.valueOf(artistId));
    }

    public List<Album> getAlbums() {
        return albumService.getAlbums();
    }
}
